<template>
    <div class="message-slot">
      <div class="message-title">
        {{title}}
      </div>
      <div class="nothing" v-show="!MessageDate.length">
        <img src="../../public/nothing.png" alt="">
        <div>这里还木有内容哦~</div>
      </div>
      <div class="emailList">
        <ul>
<!--          <li class="email-item clearfix">-->
<!--            <a href="" class="email-img"><img src="../../public/author/author1.webp" alt=""></a>-->
<!--            <div class="email-time">-->
<!--              01.02 22:36-->
<!--              <a href="">-->
<!--                <span class="iconfont">&#xe644;</span>-->
<!--              </a>-->
<!--            </div>-->
<!--            <div class="wrap">-->
<!--              <a href="" class="name">简宝玉</a>-->
<!--              <a href="" class="email-content">-->
<!--                <p>叮——你有一份年终总结待查收！新年的钟声已经响起，2019年你在简书都留下了哪些痕迹呢？快点击</p>-->
<!--              </a>-->
<!--            </div>-->
<!--          </li>-->
          <li class="email-item clearfix" v-for="item in MessageDate" :key="item.id">
            <a href="" class="email-img"><img :src="item.img" alt=""></a>
            <div class="email-time">
              {{item.time}}
              <a href="">
                <span class="iconfont">&#xe644;</span>
              </a>
            </div>
            <div class="wrap">
              <a href="" class="name">{{item.name}}</a>
              <a href="" class="email-content">
                <p>{{item.message}}</p>
              </a>
            </div>
          </li>
        </ul>
      </div>
    </div>
</template>

<script>
export default {
  name: 'MessageSlot',
  props: {
    title: {
      type: String,
      default: '收到的评论123456'
    },
    MessageDate: {
      type: Array,
      default: () => []
    }
  },
  data () {
    return {
    }
  },
  computed: {// 计算属性

  },
  mounted () { // 挂载
  },
  methods: {// 方法

  }
}
</script>

<style lang="scss">
.message-slot{
  width: 100%;
  .message-title{
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 700;
  }
  .nothing{
    text-align: center;
    margin-top: 150px;
    img{
      width: 100px;
    }
    div{
      margin-top: 20px;
      font-size: 14px;
      font-weight: 700;
    }
  }
  .emailList {
    .email-item{
      .wrap{
        margin-top: 30px;
        .name{
          display: block;
          font-size: 15px;
        }
        .email-content{
          display: block;
          p {
            margin-top: 8px;
            font-size: 12px;
            color: #999;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
          }
        }
      }
      .email-img{
        width: 48px;
        height: 48px;
        border-radius: 50%;
        overflow: hidden;
        margin: 20px 10px 20px 20px;
        border: 1px solid #969696;
        float: left;
        img{
          width: 100%;
          height: 100%;
        }
      }
      .email-time{
        float: right;
        color: #9b9b9b;
        margin: 20px 20px 0 0;
        font-size: 13px;
        .iconfont{
          color: #9b9b9b;
        }
      }
    }
  }
}
</style>
